import axios from 'axios'

axios.defaults.headers = {token: sessionStorage.getItem('isc-basic-demo-token')}

export const login = async function (query) {
    let data = await axios.get('/api/app/basic-demo-12jasx/demo/login', {
        params: {
            'username': query.username,
            'password': query.password
        }
    })
    return data.data
}
export const osLoginStatus = async function () {
    let data = await axios.get('/api/app/basic-demo-12jasx/demo/osLoginStatus')
    return data.data
}

export const queryUserAcl = async function (appCode) {
    let data = await axios.get('/api/app/basic-demo-12jasx/demo/queryUserAcl', {
        params: {
            appCode
        }
    })
    return data.data
}
export const pageUser = async function (page) {
    let data = await axios.get(' /api/app/basic-demo-12jasx/demo/pageUser', {
        params: {
            'current': page
        }
    })
    return data.data
}
